<%@page import="com.bilgeadam.bean.Movie"%>
<%@page import="com.bilgeadam.bean.City"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.bilgeadam.com/tags/h" prefix="h"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet"
	href="http://yui.yahooapis.com/pure/0.5.0/pure-min.css">
<title>Insert title here</title>
</head>
<body>

	<%
		List cities = new ArrayList();
		cities.add(new City("İstanbul"));
		cities.add(new City("Ankara"));
		cities.add(new City("Bursa"));
		pageContext.setAttribute("cities", cities);
	%>

	<c:forEach items="${cities}" var="city">
		<ul>
			<li>${city}</li>
		</ul>
	</c:forEach>
	<hr />

	<h:forEach items="${cities}" var="city" begin="0" end="2">
		<ul>
			<li>${city}</li>
		</ul>
	</h:forEach>
	<hr />

	<%
		List<Movie> movies = new ArrayList<Movie>();
		movies.add(new Movie("God Father", 100));
		movies.add(new Movie("Maskeli Beşler", 200));
		movies.add(new Movie("Scarface", 300));
		movies.add(new Movie("Good Fellas", 400));
		movies.add(new Movie("Esaretin Bedeli", 500));
		movies.add(new Movie("Memento", 600));
		movies.add(new Movie("Eşkiya", 700));
		movies.add(new Movie("Old Boys", 800));
		pageContext.setAttribute("movies", movies);
	%>

	<h:table items="${movies}" type="com.bilgeadam.bean.Movie" />
	<h:table items="${cities}" type="com.bilgeadam.bean.City" />

	<hr />

	<h:cTable items="${movies}" type="com.bilgeadam.bean.Movie" />


	<%
		List cities2 = new ArrayList();
		cities2.add(("İstanbul"));
		cities2.add(("Ankara"));
		cities2.add(("Bursa"));
		pageContext.setAttribute("cities2", cities2);
	%>


	<h:comboBox items="${cities2}" selectedIndex="2" id='cmbCities'
		class='test' />

	<hr />

	<h:menu>
		<c:forEach items="${movies}" var="movie">
			<h:menuItem title="${movie.name}" />
		</c:forEach>
	</h:menu>























</body>
</html>